* ----------------------------------- *
* Do truncuated versions of the multiplier
* ----------------------------------- *

* i.e., make some missing if the multipliers are unusually high (e.g., small countries)
* trim if less than 10 machinery patents in sample across 1995-2011
use ${d}datasets/macrosim/ctry_year_div_outsamplemultipliers_${ln_vers}pauto95_${chosen_spec}${FE}_${iwvers}${osmtrim}.dta, clear
bys ctry: egen count_wt_sample_mach_ysum = total(count_wt_sample)
replace outsample_mult = . if count_wt_sample_mach_ysum < 10
drop count_wt_sample_mach_ysum
save ${d}datasets/macrosim/ctry_year_div_outsamplemultipliers_${ln_vers}pauto95_${chosen_spec}${FE}_${iwvers}${osmtrim}_trimmed.dta, replace
